import React, { Component } from 'react'

export default class Test extends Component {
  constructor(props) {
    super(props)
    console.log(this.props)
  }
  render() {
    const Demo = this.props.eleType
    return (
      <div>
        Test
        {/* 渲染标签 */}
        {this.props.tag}
        {/* 渲染组件 */}
        <this.props.eleType></this.props.eleType>
        <Demo></Demo>
        {/* 渲染组件实例 */}
        {this.props.ele}
        {this.props.obj.name}
        <button
          onClick={() => {
            // this.props.tag = '123'
            // this.props.obj = '123'
            this.props.obj.name = '123'
            console.log(this.props.obj.name)
          }}
        >
          按钮
        </button>
      </div>
    )
  }
}
